package com.hqd.ch03.v24.aop.framework.adapter;

import com.hqd.ch03.v24.aop.Advisor;
import com.hqd.ch03.v24.aopalliance.intercept.MethodInterceptor;

public interface AdvisorAdapterRegistry {
    /**
     * 包装对应的通知
     *
     * @param advice
     * @return
     * @throws UnknownAdviceTypeException
     */
    Advisor wrap(Object advice) throws UnknownAdviceTypeException;

    /**
     * 获取对应的方法拦截器
     *
     * @param advisor
     * @return
     * @throws UnknownAdviceTypeException
     */
    MethodInterceptor[] getInterceptors(Advisor advisor) throws UnknownAdviceTypeException;

    /**
     * 注册适配器
     *
     * @param adapter
     */
    void registerAdvisorAdapter(AdvisorAdapter adapter);
}
